package org.shop.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.shop.dao.SystemMessageMapper;
import org.shop.entity.SystemMessage;
import org.shop.service.SystemMessageService;
import org.shop.service.base.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class SystemMessageServiceImpl extends BaseServiceImpl<SystemMessage, Long> implements SystemMessageService{

	@Autowired
	private SystemMessageMapper systemMessageMapper;
	
	
	@Override
	public List<Map<String,Object>> getSystemMessageList(Map<String, Object> paramMap) {
		return systemMessageMapper.getSystemMessageList(paramMap);
	}


	@Override
	public Map<String, Object> getSystemMessageInfoList(Map<String, Object> pramMap) {
		List<Map<String, Object>> allUsersInfoList = systemMessageMapper.getSystemMessageInfoList(pramMap);
        Integer count = systemMessageMapper.getSystemMessageCount(pramMap);
        //分页数据
        Map<String, Object> dataMap = new HashMap<String, Object>();
        dataMap.put("total", count);
        dataMap.put("rows", allUsersInfoList);
        return dataMap;
	}


	@Override
	public Map<String, Object> getSystemMessageRecently(Map<String, Object> pramMap) {
		return systemMessageMapper.getSystemMessageRecently(pramMap);
	}
	
	
}